import request from '@/utils/request';

// 个人offer查看
export const getOfferDetail = offerCode => request(`/api/oa/v1/offer/getpersonalofferdetail/${offerCode}`);
// 企业管理offer查看
export const getCompanyOfferDetail = offerCode => request(`/api/oa/v1/offer/getbusinessofferdetail/${offerCode}`);

/**
 * 获取候选人信息
 * @returns {Promise<*|*>}
 * @param candidateCode
 */
export const getCandicationInfo = async candidateCode => request(
    `/api/oa/v1/offer/gettalentbycandidatecode/${candidateCode}`
);

// 更新offer状态
export const updateOfferState = async params => request('/api/oa/v1/offer/updateofferstate', {
    method: 'POST',
    data: params
});
